package cn.zyl.demo.jetty.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * JettyIndexController 类说明:
 *
 * @author z.y.l
 * @version v1.0
 * @date 2020-09-01
 */
@Controller
@RequestMapping("/")
public class JettyIndexController {
    @RequestMapping("")
    public String index(){
        return "index";
    }
    @RequestMapping("hello")
    public ModelAndView hello(){
        //设置对应JSP的模板文件
        ModelAndView modelAndView = new ModelAndView("hello");
        //设置${info}标签的值
        modelAndView.addObject("info", "Hello,JETTY.");
        return modelAndView;
    }
}
